package com.mydemo.design_pattern.create_type.abstract_factory;

/**
 * <p></p >
 *
 * @author liming1
 * @version $Id: DemoTest, v1.0 2019-09-18 10:15 liming1 Exp $
 */
public class DemoTest {
    public static void main(String[] args) {
        AbstractFactory product1F = ProducterFactory.getFactory("product1");
        AbstractFactory product2F = ProducterFactory.getFactory("product2");

        IProduct1 demo1 = product1F.createProduct1("demo1");
        demo1.print1();
        IProduct1 demo2 = product1F.createProduct1("demo2");
        demo2.print1();
        IProduct1 demo3 = product1F.createProduct1("demo3");
        demo3.print1();

        IProduct2 demo11 = product2F.createProduct2("demo1");
        demo11.print2();
        IProduct2 demo21 = product2F.createProduct2("demo2");
        demo21.print2();
        IProduct2 demo31 = product2F.createProduct2("demo3");
        demo31.print2();
    }
}
